#pragma once

#include <cstdio>
#include <vector>
#include <opencv2/core/core.hpp>

using namespace std;
using namespace cv;

template <class DstType, class SrcType>
bool IsType(const SrcType* src)
{
  return dynamic_cast<const DstType*>(src) != 0;
}

const int SEGTYPE_LINE = 0;
const int SEGTYPE_CIRC = 1;
const int SEGTYPE_CLOT = 2;

class Segment
{

public:

	int type;

	Point2d startingPoint;
	double startingAngle;
	//Segment();
	virtual ~Segment(){};
};

class StraightLine: public Segment
{
public:
	StraightLine()
	{
		type = SEGTYPE_LINE;
	}
	double length;
};

class CircleArc: public Segment
{
public:
	CircleArc()
	{
		type = SEGTYPE_CIRC;
	}
	double endingAngle;
	double radius;

	double getRadius(){
		return radius;
	}
};
